package zhouyi;

public class Pets {
    private String name;
    private String  sex;
    private int likeNO;
    private int health;
  private  String pType;

    public String getpType() {
        return pType;
    }

    public void setpType(String pType) {
        this.pType = pType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String  getSex() {
        return sex;
    }

    public void setSex(String  sex) {
        this.sex = sex;
    }

    public int getLikeNO() {
        return likeNO;
    }

    public void setLikeNO(int likeNO) {
        if(likeNO >0&likeNO <100){
            this.likeNO  = likeNO ;
        }else {
            System.out.println("亲密度应该在(0~100)之间,默认值为60");
            this.likeNO =60;
        }

    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        if(health>0&&health<100){
            this.health = health;
        }else {
            System.out.println("健康值应该在(0~100)之间,默认值为60");
            this.health=60;
        }

    }
}
